package com.jinrustar.weimaqi.util

import java.text.SimpleDateFormat
import java.util.*

/**
 * Created by liduanwei on 2017/10/26 0026. liduanwei1988@gmail.com
 */
object DateUtil {
    fun formatDate(date: Date, pattern: String): String {
        var smf = SimpleDateFormat(pattern)
        return smf.format(date)
    }
    fun formatDate(date: Date): String {
        var smf = SimpleDateFormat("yyyy-MM-dd HH:mm:ss")
        return smf.format(date)
    }
}